﻿@model WarFrota.Models.Veiculo

@{
    ViewBag.Title = "Veículo";
}

<h2>Novo</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-1.5.1.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#DataCompra").datepicker();
    });
</script>


@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Veiculo</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Placa)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Placa)
            @Html.ValidationMessageFor(model => model.Placa)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Modelo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Modelo)
            @Html.ValidationMessageFor(model => model.Modelo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DataCompra)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DataCompra)
            @Html.ValidationMessageFor(model => model.DataCompra)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.KMAtual)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.KMAtual)
            @Html.ValidationMessageFor(model => model.KMAtual)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Consumo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Consumo)
            @Html.ValidationMessageFor(model => model.Consumo)
        </div>

        <p>
            <input type="submit" value="Salvar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Voltar", "Index")
</div>
